package fr.gunduz.springdatamongodb.model;

import java.util.Date;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 *
 * @author beytu
 */
@Document
public class Author
{
	@Id
	private ObjectId id;
	
	@Indexed
	private String firstname;
	
	@Indexed
	private String lastname;
	
	private Date born;
	
	private String nationality;
	

	public ObjectId getId()
	{
		return id;
	}

	public void setId(ObjectId id)
	{
		this.id = id;
	}
	
	public String getFirstname()
	{
		return firstname;
	}

	public void setFirstname(String firstname)
	{
		this.firstname = firstname;
	}

	

	public String getLastname()
	{
		return lastname;
	}

	public void setLastname(String lastname)
	{
		this.lastname = lastname;
	}

	public Date getBorn()
	{
		return born;
	}

	public void setBorn(Date born)
	{
		this.born = born;
	}

	public String getNationality()
	{
		return nationality;
	}

	public void setNationality(String nationality)
	{
		this.nationality = nationality;
	}

	
	
	
	
}
